Skip to content

Conversation

@aimcom
Copy link
Contributor

@aimcom aimcom commented Dec 14, 2017

After creating a record with this.datastore.createRecord(Example, {}) and using save().subscribe((example: Example) => { console.log(example); }), it is not possible to catch an error if the HTTP response has an error status code (e.g. "400 Bad Request") because saveRecord returns an Observable of the model.

It would be better to use the default handleError method of JsonApiDatastore if an error occurs when saving a record.

@aimcom
Copy link
Contributor Author

aimcom commented Dec 14, 2017

Duplicate to #111

@aimcom aimcom closed this Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant